# !/bin/sh

port=`awk -F: 'NR==2 {print $2}' sh.conf`



sleep 600
exit


port="5566"
port1="7788"

echo aa${port}bb
echo aa"$port"bb
echo aa$port.bb
echo aa$portbb
echo aa$port$port1
echo aa'$port'bb



echo ''
for i in {1..2}
do
        echo check$i:
        res=`curl --connect-timeout 2 http://127.0.0.1:20001/version` # 当前服务运行端口
        echo '---' #换行使用
        echo startTime:${res}

        currentTime=`date "+%Y-%m-%d %H:%M:%S"`
        echo now:"$currentTime"
        currentTimeStamp=`date -d "$currentTime" +%s`

        dis=$(($(date +%s -d "$currentTime") - $(date +%s -d "$res")))
        #echo dis:"$dis"

        if [ -n "$res" ] and [`$dis` -ge 60] #-ge 表示大于等于>=
                then
                echo "run server success"
                break
        fi
        sleep 1
done
sleep 600
# 写个本地接口测试